package com.ylyq.ylxx.model.request;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.web.multipart.MultipartFile;

import java.io.File;

/**
 * @ClassName UploadFileImageRequest
 * @Description TODO
 * @Author xiaweichao
 * @Date 2020/7/22 14:30
 * @Version 1.0
 */
@NoArgsConstructor
@AllArgsConstructor
@Data
@ApiModel(value = "上传图片素材的请求参数")
public class UploadFileImageRequest {
    @ApiModelProperty(value = "广告主ID",required = true)
    private Long advertiser_id;
    @ApiModelProperty(value = "图片上传方式\n" +
            "默认值：\"UPLOAD_BY_FILE\"\n" +
            "允许值：\"UPLOAD_BY_FILE\"\"UPLOAD_BY_URL\"")
    private String upload_type;
    @ApiModelProperty(value = "图片的md5值(用于服务端校验)，upload_type为\"UPLOAD_BY_FILE\"必填")
    private String image_signature;
    @ApiModelProperty(value = "图片url地址，如http://xxx.xxx，upload_type为\"UPLOAD_BY_URL\"必填")
    private String image_url;
    @ApiModelProperty(value = "素材的文件名，可自定义素材名，不传择默认取文件名，最长255个字符\n" +
            "注：若同一素材已进行上传，重新上传不会改名")
    private String filename;
    @ApiModelProperty(value = "图片文件,upload_type为\"UPLOAD_BY_FILE\"必填\n" +
            "格式: jpg，jpeg,png,bmp,gif, 大小1M内")
//    private File image_file;
    private MultipartFile image_file;

}
